package com.tongji.seller.command
{
	import com.tongji.seller.events.GetStoreSceneDetailEvent;
	import com.tongji.seller.model.StoreSceneModel;
	import com.tongji.seller.service.StoreSceneService;
	
	import org.robotlegs.mvcs.Command;
	
	/**
	 *
	 * @author caddy
	 * @date 2011-12-15
	 */
	public class GetStoreSceneDetailCommand extends Command
	{
		[Inject]
		public var service:StoreSceneService;
		
		[Inject]
		public var model:StoreSceneModel;
		
		[Inject]
		public var event:GetStoreSceneDetailEvent;
		
		override public function execute():void
		{
			switch(event.type)
			{
				case GetStoreSceneDetailEvent.GET_SCENE_DETAIL:
				{
					service.getSceneDetail(event.sid);
					break;
				}
				case GetStoreSceneDetailEvent.UPDATE_SCENE_DETAIL:
				{
					model.updateSceneDetail(event.scene);
					break;
				}	
				default:
				{
					break;
				}
			}
		}
	}
}